package zuoye;

public class Student {
    private String name;
    private int age;

    public Student(String name , int age){
        this.age=age;
        this.name = name;
    }
    public void getAge(String name){
        this.name=name;
    }

    public void getName(int age){
        this.age = age;
    }

    public String setName(){
        return name;
    }

    public int setAge(){
        return age;
    }

    @Override
    public String toString() {
        return "这个人叫"+name+"，"+age+"岁了";
    }

    @Override
    public boolean equals(Object obj) {
        Student student = (Student) obj;
        return this.name.equals(student.name);
    }


}
